﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wallpaper.Models.Entities
{
    [Table("user_messages")]
    public class UserMessage:BaseEntity
    {
        

        /// <summary>
        /// 消息ID（外键关联Message表）
        /// </summary>
        public string MessageId { get; set; }

        /// <summary>
        /// 用户ID（接收者ID）
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 是否已读
        /// false=未读, true=已读
        /// </summary>
        public bool IsRead { get; set; }

        /// <summary>
        /// 阅读时间
        /// null=未读, 有值=已读时间
        /// </summary>
        public DateTime? ReadAt { get; set; }

        /// <summary>
        /// 关联创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 导航属性 - 消息详情
        /// </summary>
        public Message Message { get; set; }
    }
}
